# coding=utf-8
from django.db import models
from django.conf import settings


class Tenant(models.Model):
    name = models.CharField(max_length=200, verbose_name=u'名称')
    create_user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=u"创建人", on_delete=models.PROTECT,
                                    editable=False)
    create_time = models.DateTimeField(verbose_name=u'创建时间', auto_now_add=True, editable=False)
    is_bind_app = models.BooleanField(verbose_name=u'是否绑定小程序', default=False, editable=False)
    delete = models.BooleanField(verbose_name=u'删除', default=False, editable=False)

    class Meta:
        db_table = 'tenant'
        ordering = ['-id']
        verbose_name = '租户'
        default_permissions = ()
